package main

import (
	"fmt"
	"os"
	"strings"
)

func main() {
	var path = "abc/def/hg"
	sep := string(os.PathSeparator)
	fmt.Println(strings.ReplaceAll(path, "/", sep))
	if _, err := os.Stat(path); os.IsNotExist(err) {
		os.MkdirAll(path, 0666)
	}

}
